package com.wondertek.poms.core.thread;

import com.wondertek.poms.core.service.IContentService;
import com.wondertek.poms.dao.po.PrdCont;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


public class SendPrdContsKafkaThread implements Runnable {
	private final static Log log = LogFactory.getLog(SendPrdContsKafkaThread.class);
	@Resource
	private IContentService contentService;

	private List<PrdCont> prdConts;
	
	public List<PrdCont> getPrdConts() {
		return prdConts;
	}

	public void setPrdConts(List<PrdCont> prdConts) {
		this.prdConts = prdConts;
	}

	public SendPrdContsKafkaThread(List<PrdCont> prdConts) {
		this.prdConts = prdConts;
	}

	@Override
	public void run() {
        for(PrdCont prdCont:prdConts){
        	log.info("开始推送节目"+prdCont.getPrdContId()+"到kafka");
//        	Map<String, Object> map = contentSyncManager.getBcIdInfo(prdCont);
//        	contentSyncManager.sendKafka(prdCont,"2",StringUtil.nullToLong(map.get("bcId")));
        	log.info("推送节目"+prdCont.getPrdContId()+"到kafka结束");
		}
		
	}
}
